
fn pointer_hash(location: *const ()) -> u32 {
    // Cast the pointer to an unsigned long (in Rust, this is `usize`)
    let ptr_as_usize: usize = location as usize;
    // Cast the usize to an unsigned int (u32)
    let hash_value: u32 = ptr_as_usize as u32;
    // Return the hash value
    hash_value
}

fn main() {
    // Example usage
    let data = 42;
    let data_ptr: *const i32 = &data;
    let hash = pointer_hash(data_ptr);
    println!("Hash of the pointer: {}", hash);
}

